﻿using System.Net;

namespace Sage.Http.Exceptions
{
    /// <summary>
    /// 表示HTTP客户端请求过程中发生的异常。
    /// </summary>
    /// <param name="statusCode">HTTP状态码</param>
    /// <param name="message">错误消息</param>
    /// <param name="innerException">内部异常</param>
    public class HttpClientRequestException(HttpStatusCode statusCode, string message, Exception? innerException = default)
        : Exception(message, innerException)
    {
        /// <summary>
        /// HTTP状态码
        /// </summary>
        public HttpStatusCode StatusCode { get; } = statusCode;
    }
}
